<template>
  <div class="payRecBox">
    <mt-search
      class="search"
      v-model="value"
      placeholder="输入关键字查询">
    </mt-search>

    <div class="item">
      <div @click="goInvoicePreview('recId')">
        <div class="payRecords">
          <div>
            <span class="name">张素素&nbsp;<span class="sef">(本人)</span></span>
            <span class="kaipiaozhong" :style="{display: invoiceSatus==1 ? 'block' : 'none'}">开票中</span>
            <span class="yikaipiao" :style="{display: invoiceSatus==2 ? 'block' : 'none'}">已开票</span>
            <span class="yichonghong" :style="{display: invoiceSatus==3 ? 'block' : 'none'}">已冲红</span>
            <span class="wuxiao" :style="{display: invoiceSatus==4 ? 'block' : 'none'}">无效</span>
          </div>
          <div>
            <span class="data">2020-06-15 15:00</span>
            <span class="iconfont iconarrow-right arrow"></span>
          </div>
          <div>
            <span class="address">厦门市思明区龙虎路726号501</span>
            <span class="amount">3200</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      // 搜索关键字
      value: '',
      // 用户当前的开票状态 开票中(1) 已开票(2) 已冲红(3) 无效(4)
      invoiceSatus: 1
    }
  },
  created () {
    this.getInvoicelog()
  },
  methods: {
    async getInvoicelog () {
      const payLog = await this.$http.get('list/invoiceRequestLog')
      console.log(payLog)
    },
    goInvoicePreview (id) {
      this.$router.push('/invoicePreview?id=' + id)
    }
  }

}
</script>

<style lang="less" scoped>
  .payRecBox {
    box-sizing: border-box;
    border: 1px solid transparent;
    padding-left: 20px;
    padding-top: 54px;
    padding-right: 20px;
    .search {
      border: 1px solid #ccc;
      border-radius: 3px;
    }
    /deep/ .mint-search {
      height: 34px;
    }
    /deep/ .mint-searchbar {
      padding: 0;
      background-color: #fff;
    }
    /deep/ .mint-searchbar-inner {
      padding: 0;
      height: 34px;
      // border: 2px solid #ccc;
      // border-radius: 5px;
    }
    /deep/ i {
      font-size: 22px;
      color: #9A9A9A;
      margin: 0 8px 0 6px;
    }
    /deep/ a {
      height: 34px;
      line-height: 34px;
      padding: 0 10px;
      color: #333333;
      // border: 1px solid #ccc;
      // border-radius: 5px;
    }
    /deep/ input::-webkit-input-placeholder {
      font-size: 15px;
      color: #CCCCD1;
    }
    /deep/ input {
      color: #666666;
      font-size: 15px;
    }
  }
  .search {
    margin-bottom: 25px;
  }

  .payRecords {
    margin-bottom: 10px;
  }
  .payRecords > div {
    display: flex;
    justify-content: space-between;
  }
  .payRecords div:nth-child(1) {
    font-size: 15px;
    margin-bottom: 10px;
    padding-right: 30px;
  }
  .payRecords div:nth-child(3) {
    padding-right: 43px;
  }
  .payRecords div:nth-child(4) {
    justify-content: flex-end;
    margin-top: 10px;
  }

  .name {
    color: #333333;
    font-weight: 500;
  }
  .sef {
    color: #999999;
  }
  .kaipiaozhong {
    color: #EAA900;
  }
  .yikaipiao {
    color: #4BB633;
  }
  .yichonghong {
    color: #FF0000;
  }
  .wuxiao {
    color: #CCCCCC;
  }
  .data {
    font-size: 13px;
    color: #999;
  }
  .arrow {
    font-size: 22px;
    font-weight: 600;
    color: #C1D1D1;
  }
  .address {
    font-size: 14px;
    color: #666666;
  }
  .amount {
    font-size: 14px;
  }

</style>
